const fp = require('lodash/fp');
let cars = [
    {
        name:'car1',
        in_stock:false,
        dollar_value:1,
    },
    {
        name:'car2',
        in_stock:true,
        dollar_value:1,
    },
];
let isLastInStock = fp.flowRight(fp.prop('in_stock'),fp.last);
console.log(isLastInStock(cars));
